package com.zhang.family_doctor.service;

import com.github.pagehelper.PageInfo;
import com.zhang.family_doctor.dto.DoctorDto;
import com.zhang.family_doctor.dto.DoctorRoleDto;
import com.zhang.family_doctor.entity.DoctorRole;
import com.zhang.family_doctor.entity.R;
import com.zhang.family_doctor.vo.DoctorAllVO;
import com.zhang.family_doctor.vo.DoctorVO;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

public interface DoctorService {

    /**
     * 后台系统登录
     * @param phone
     * @param password
     * @return
     */
    R login(String phone, String password);

    /**
     * 新增医生
     * @param doctorRoleDto
     * @param request
     * @return
     */
    R saveDoctor(DoctorRoleDto doctorRoleDto, HttpServletRequest request);

    /**
     * 编辑医生信息
     * @param doctorRoleDto
     * @param request
     * @return
     */
    R updateDoctor(DoctorRoleDto doctorRoleDto, HttpServletRequest request);

    /**
     * 查看所有的医生
     * @return
     */
    R<PageInfo<DoctorAllVO>> getAllDoctor(DoctorDto doctorDto);

    /**
     * 医生端登录
     * @param phone
     * @param password
     * @return
     */
    R<Map> loginDoctor(String phone, String password);

    /**
     * 根据id删除医生
     * @param id
     * @return
     */
    R<String> deleteDoctor(Integer id);

    /**
     * 医生单个新增或多个新增角色
     * @param doctorRoleList
     * @return
     */
    R<String> saveAll(List<DoctorRole> doctorRoleList);

    /**
     * 查看医生详情
     * @param id
     * @return
     */
    R<DoctorVO> getDoctorDetails(Integer id);

    /**
     * 后台登录接口共给第三方接口token
     * @param phone
     * @param password
     * @return
     */
    String logins(String phone, String password);
}
